//web 服务器（express)


var express=require('express');
var app=express();
var serveStatic =require('serve-static')


//第三方的中间键
var options = {
  dotfiles: 'ignore',
  etag: false,
  extensions: ['htm', 'html'],
  index: false,
  maxAge: '1d',
  redirect: false,
  setHeaders: function (res, path) {
    res.set('x-timestamp', Date.now())
  }
};
//app.use(serveStatic('public/ftp', options));

//设置
app.set('view engine', 'ejs');
app.set('views', __dirname + '/views');


var server=app.listen(3000,function(){
	console.log("http server listen on %d",server.address.port);
})